-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add husky and commitlint for improved commit message linting #66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces comprehensive commit message linting infrastructure to enforce Conventional Commits standards, improving consistency and enabling automated releases. The changes add both local pre-commit validation via Husky hooks and CI-based validation through GitHub Actions.
Changes:
- Adds commitlint and husky packages with configuration for Conventional Commits enforcement
- Implements local Git hooks for commit message validation and pre-commit testing
- Creates GitHub Actions workflow for automated commit linting in CI
- Updates documentation to clarify commit message format requirements and provide examples
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds @commitlint/cli, @commitlint/config-conventional, and husky dependencies; adds prepare script for husky |
| package-lock.json | Updates lockfile with new dependencies and bumps version from 0.5.0 to 0.5.1 |
| commitlint.config.js | Basic commitlint configuration extending conventional config |
| .husky/commit-msg | Git hook to validate commit messages using commitlint |
| .husky/pre-commit | Git hook to run tests before each commit |
| .github/workflows/commitlint.yml | CI workflow for validating commit messages on push and PRs |
| .github/copilot-instructions.md | Adds commit message formatting guidelines for AI assistance |
| .github/CONTRIBUTING.md | Expands commit guidelines with detailed Conventional Commits documentation |
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 7 out of 8 changed files in this pull request and generated 6 comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
ecd3695 to
d55c66f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated no new comments.
This pull request introduces automated commit message linting to enforce the Conventional Commits standard, both locally and in CI, and updates documentation to clarify the commit message policy. The changes ensure that all contributors follow a consistent commit message format, which helps automate releases and improves project maintainability.
Commit Linting Automation:
.github/workflows/commitlint.yml) to automatically lint commit messages on every push and pull request, ensuring compliance with Conventional Commits.commitlintand its conventional config as development dependencies inpackage.json, and sets up a basic configuration incommitlint.config.js. [1] [2] [3]commit-msghook and runs tests on pre-commit, ensuring that invalid commit messages are caught before reaching the repository. [1] [2] [3]Documentation Updates:
.github/CONTRIBUTING.mdand.github/copilot-instructions.mdto clarify the required Conventional Commits format, providing examples and specifying allowed commit types. [1] [2]